import axi from 'axios';

export default {
  queryBExam(p) {
    return axi.get('/bexam/queryBExamByPagination', {
      params: p,
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },

  queryDB(p) {
    return axi.get('/bquestiondb/queryBQuestionDbs', {
      params: p,
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },
  self(p) {
    return axi.post('/bpaper/self', p, {
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },
  add(p) {
    return axi.post('/bpaper/add', p, {
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },
};
